{extend name="layout:default" /}
{block name="title"}问卷列表{/block}
{block name="content"}
<div class="row">
    <div class="col-xs-12">
        <div class="box">
            <div class="box-header">
                <h3 class="box-title">问卷列表</h3>
                <div class="box-tools">
                    <a href="{:url('add')}" class="btn btn-info"> 添加 </a>
                </div>
            </div>
            <!-- /.box-header -->
            <div class="box-body table-responsive no-padding">
                <table class="table table-hover">
                    <tbody>
                    <tr>
                        <th>ID</th>
                        <th>问卷名</th>
                        <th>问卷描述</th>
                        <th>图片</th>
                        <th>分类</th>
                        <th>类别</th>
                        <th>是否热门</th>
                        <th>是否最新</th>
                        <th>是否放置首页</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    {volist name="banks" id="vo"}
                    <tr>
                        <td>{$vo.id}</td>
                        <td>{$vo.title}</td>
                        <td>{$vo.introduction}</td>
                        <td><img src="{$vo.thumb}" alt="" width="100"></td>
                        <td>{$vo.category_id}</td>
                        <td>{$vo.class_ids}</td>
                        <td>{$vo.is_hot === 1 ? '<span class="glyphicon glyphicon-ok" style="color: green"></span>' :
                                                '<span class="glyphicon glyphicon-remove" style="color: red"></span>'}</td>
                        <td>{$vo.is_new === 1 ? '<span class="glyphicon glyphicon-ok" style="color: green"></span>' :
                            '<span class="glyphicon glyphicon-remove" style="color: red"></span>'}</td>
                        <td>{$vo.is_home === 1 ? '<span class="glyphicon glyphicon-ok" style="color: green"></span>' :
                            '<span class="glyphicon glyphicon-remove" style="color: red"></span>'}</td>
                        <td>{$vo.status === 1 ? '<a href="#" class="btn btn-success">正常</a>' : '<a href="#" class="btn btn-danger">禁用</a>'}</td>
                        <td>
                            <a title="查看" href="{:url('/admin/results/index',['id'=>$vo.id])}" class="btn btn-info">所有问卷</a>
                            <a title="修改" href="{:url('edit',['id'=>$vo.id])}" class="btn btn-success"><i
                                    class="glyphicon glyphicon-edit"></i></a>
                            <!--<a title="删除" href="{:url('del',['id'=>$vo.id])}" class="btn btn-danger"><i
                                    class="glyphicon glyphicon-trash"></i></a>-->
                        </td>
                    </tr>
                    {/volist}
                    </tbody>
                </table>
                {$banks->render()}
            </div>
            <!-- /.box-body -->
        </div>
        <!-- /.box -->
    </div>
</div>
{/block}